<!--
 * @Descripttion: 
 * @version: 
 * @Author: wangys
 * @Date: 2022-06-08 15:15:23
-->
<template>
  <div class="segment-container">
    <div class="title">
      <div class="icon">
        <i class="iconfont icon-biaoqian"></i>
        <span>分类</span>
      </div>
      <div>
        <a href="javascript:;">more>></a>
      </div>
    </div>

    <div class="content-container">
      <!-- 包裹里面的盒子 -->
      <div class="content">
        <!-- 每一条信息 -->
        <div v-if="data">
          <div class="content-item">
            <div>
              <router-link to="classify/opertion"> 操作系统</router-link>
            </div>
            <div>1</div>
          </div>
          <div class="content-item">
            <div><router-link to="classify/record"> 踩坑记录</router-link></div>
            <div>1</div>
          </div>
          <div class="content-item">
            <div>
              <router-link to="classify/interview"> 面经及解答</router-link>
            </div>
            <div>1</div>
          </div>
          <div class="content-item border-none">
            <div><router-link to="classify/language"> Mysql</router-link></div>
            <div>1</div>
          </div>
        </div>
        <div v-else class="item">
          <div><a href="javascript:;"> 底层原理</a></div>
          <div><a href="javascript:;"> 计算机网络</a></div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Segment',
  props: ['data']
}
</script>

<style lang="less" scoped>
.segment-container {
  width: 310px;
  margin: 50px 0 50px 50px;
  border: 1px solid #ccc;
  border-radius: 10px;
  .title {
    display: flex;
    justify-content: space-between;
    height: 48px;
    align-items: center;
    margin: 0 10px;
    box-sizing: border-box;
    border-bottom: 1px solid #ccc;
  }
  .content-container {
    .content {
      margin: 10px;
      border: 1px solid #ccc;
      border-radius: 10px;

      .content-item {
        display: flex;
        justify-content: space-between;
        height: 35px;
        padding: 0 10px;
        line-height: 35px;
        border-bottom: 1px solid #ccc;
      }
      .item {
        display: flex;
        justify-content: space-around;
      }
      .border-none {
        border-bottom: none;
      }
    }
  }
}
</style>
